// 请求真实后端
import { request } from '@/api/service'
import globalAPI from '@/api/globalAPI'

export function GetList (query) {
  var queryStr = ''
  if (query.brandId !== undefined) {
    queryStr = `&${query.brandId}`
  }
  if (query.modelId !== undefined) {
    queryStr = `${queryStr}&${query.brandId}`
  }
  return request({
    url: `${globalAPI.BASE_URL}/stb/stbTypes/v1?size=${query.size}&current=${query.current}${queryStr}`,
    method: 'get'
  })
}

export function GetDetails (query) {
  return request({
    url: `${globalAPI.BASE_URL}/stb/stbType/${query}/v1`,
    method: 'get'
  })
}
